using System;
using Thunder.Vector.Model.Units;

namespace Thunder.Vector.Model.Shapes
{
	public class Rectangle : Shape
	{
		private Unit x;
		private Unit y;
		private Unit w;
		private Unit h;
		
		public Unit X
		{
			get { return x; }
			set { x = value; }			
		}
		public Unit Y
		{
			get { return y; }
			set { y = value; }
		}
		public Unit W
		{
			get { return w; }
			set { w = value; }
		}
		public Unit H
		{
			get { return h; }
			set { h = value; }
		}
		public Unit Left
		{
			get { return x; }
			set { x = value; }
		}
		public Unit Top
		{
			get { return y; }
			set { y = value; }
		}
		public Unit Width
		{
			get { return w; }
			set { w = value; }
		}
		public Unit Height
		{
			get { return h; }
			set { h = value; }			
		}
		public Unit Right
		{
			get { return x + w; }
			set { w = value - x; } // TODO
		}
		public Unit Bottom
		{
			get { return y + h; }
			set { h = value - y; } // TODO
		}
		
		public Rectangle()
		{
			X = Y = W = H = new Unit(null, 0, UnitTypes.Pixel);
		}
	}
}

